import numpy as np
import matplotlib.pyplot as plt
import math
# x = [i for i in range(0,22,2)] 
x = np.arange(0,22,2)
y1 = 2*x - 2*math.log2(2)
y2 = np.sin(x) +1
# 红色实线
plt.plot(x,y1,color='red',linestyle='-')
# 蓝色....
plt.plot(x,y2,color='blue',linestyle='dashed')
plt.show()